<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/base/base.jsp"%>
<%@ include file="/base/database.jsp"%>


	<%
		String studentNo=request.getParameter("studentNo");
	
		Connection conn=getConn();
		
		String sql="select * from sys_score where studentNo=?";
		
		PreparedStatement pstmt=conn.prepareStatement(sql);
		
		pstmt.setString(1,studentNo);
		
		ResultSet rs=pstmt.executeQuery();
		
		String rs_year="";
		String rs_term="";
		String rs_studentName="";
		String rs_courseName="";
		String rs_studentNo="";
		String rs_className="";
		String rs_feature="";
		String rs_credit="";
		String rs_gpa="";
		String rs_score="";
		String rs_rescore="";
		
		if(rs.next()){
			
		
			rs_year=rs.getString("year");
			rs_term=rs.getString("term");
			rs_studentName=rs.getString("studentName");	
			rs_courseName=rs.getString("courseName");
			rs_studentNo=rs.getString("studentNo");
			rs_className=rs.getString("className");
			rs_feature=rs.getString("feature");
			rs_credit=rs.getString("credit");
			rs_gpa=rs.getString("gpa");
			rs_score=rs.getString("score");
			rs_rescore=rs.getString("rescore");
			
			
		}
		
		
		session.setAttribute("rs_year",rs_year);
		session.setAttribute("rs_term", rs_term);
		session.setAttribute("rs_studentName",rs_studentName);
		session.setAttribute("rs_courseName",rs_courseName);
		session.setAttribute("rs_studentNo",rs_studentNo);
		session.setAttribute("rs_className",rs_className);
		session.setAttribute("rs_feature",rs_feature);
		session.setAttribute("rs_credit",rs_credit);
		session.setAttribute("rs_gpa",rs_gpa);
		session.setAttribute("rs_score", rs_score);
		session.setAttribute("rs_rescore",rs_rescore);
		
		if(pstmt!=null){
			pstmt.close();
		}
		if(conn!=null){
			conn.close();
		}
		
		process(request,response,"score_search.jsp");
		
	%>